//
//  LGMallAPI.swift
//  LeGou
//
//  Created by lxm on 2022/9/21.
//
import Foundation

enum LGMallAPI {
    case lesson_list(_ param : [String : Any])
    // 自营商城
    case LG_mall_list(_ param : [String : Any])
}

extension LGMallAPI: ZMApiProvider {
    func BaseUrl() -> String {
        return baseUrl
    }
    
    func urlAndMthodAndParam() -> (url: String, method: ZMHTTPMethod, params: [String : Any], body: Bool) {
        switch self {
        case .lesson_list(let pa):
            return ("/api/front/product/knowledge/list", .get, pa, false)
        case .LG_mall_list(let pa):
            return ("/api/front/product/own/list", .get, pa, false)
        }
    }
    
    func HTTPHeader() -> ZMHTTPHeaders? {
        return AppHelper.reqeustHeader()
    }
    
    func UpLoadData() -> [Data]? {
        return nil
    }
    
    func ParamInBody() -> Bool {
        switch self {
//            return true
        default:
            return false
        }
    }
}
